package com.bjpowernode.controller;

import com.bjpowernode.entity.TProduct;
import com.bjpowernode.result.R;
import com.bjpowernode.service.ProService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ProController {

    @Resource
    private ProService proService;

    @GetMapping(value = "/api/product")
    public R salingProduct() {
        List<TProduct> tProducts = proService.getsalingProduct();
        return R.OK(tProducts);
    }

}
